<?php
class Custommer extends CI_Controller
{
	public function __construct()
	{
		parent::__construct();

		// load helper
		$this->load->helper('url');
		// $this->load->library('session');

		$this->load->model("Custommer_model", '', TRUE);
	}

	public function index()
	{
		$companyId = 1;		
		$data['lstCustommer'] = $this->Custommer_model->All($companyId);

		$data['mainView'] = 'custommer/index';
		$this->load->view('shared/layout', $data);
	}

	public function create()
	{
		$data['mainView'] = 'custommer/create';
		$this->load->view('shared/layout', $data);
	}	

	public function create_post()
	{
		$companyId = 1;
		$this->Custommer_model->Add($companyId);

		redirect("/custommer/index/$companyId");
	}	
}
?>